#include "send_recv.h"
#include "unistd.h"

// #define CONF_LOOP_WR 1024

int main(int argc, char *argv[])
{
	int opt;
	int i;
	while(1){
		system("clear");
		printf("//======================================================//\n");
		printf("\tPlease chose your option:\n");
		printf("\t0:\tstart sending packet\n");
		printf("\t1:\tstop sending packet\n");
		printf("\t2:\tconfigure sending packet\n");
		printf("\t3:\tread sending packet\n");
		printf("\t4:\tset internal clks between two packets\n");
		printf("//======================================================//\n");
		printf("opt is: ");
		scanf("%d", &opt);

		if(opt == 0){
			start_sending_pkt();
		}
		else if(opt == 1){
			stop_sending_pkt();
		}
		else if(opt == 2)
			conf_sending_pkt();
		else if(opt == 3){
		}
		else if(opt == 4){
			system("clear");
			printf("//======================================================//\n");
			printf("\tPlease input internal clks between two packets:\n");
			printf("//======================================================//\n");
			printf("internal clks is: ");
			int value;
			scanf("%d", &value);
			set_internal_clks(value);
		}
	}

    return 0;
} 
